﻿@model Promocot.Models.Clasificacion

@{
    ViewBag.Title = "crearClasificacion";
}

<h2>crearClasificacion</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Clasificacion</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.tipo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.tipo)
            @Html.ValidationMessageFor(model => model.tipo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.nombre)
            @Html.ValidationMessageFor(model => model.nombre)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.cod_clasificacion_padre)
        </div>
        <div class="editor-field">
            
            @Html.DropDownListFor(c => c.cod_clasificacion_padre, new SelectList(ViewBag.clasificaciones,"cod_clasificacion","nombre"))
            @Html.ValidationMessageFor(model => model.cod_clasificacion_padre)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.cod_empresa)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(c =>c.cod_empresa, new SelectList(ViewBag.empresas, "cod_empresa","nombre_empresa"))
            @Html.ValidationMessageFor(model => model.cod_empresa)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

